set(FRUDATA_LIB frudata_intf)

find_package(PkgConfig REQUIRED)
pkg_search_module(GLIB REQUIRED glib-2.0)
pkg_search_module(GMODULE REQUIRED gmodule-2.0)

file(GLOB_RECURSE SOURCES "*.c")
add_library(${FRUDATA_LIB} SHARED ${SOURCES})
target_include_directories(${FRUDATA_LIB}
    PUBLIC ${LUACLIB_SRC_DIR}
    PUBLIC ${CONAN_INCLUDE_DIRS}
    PUBLIC ${GLIB_INCLUDE_DIRS}
)
target_link_libraries(${FRUDATA_LIB}
    PUBLIC ${CONAN_LIBS_HUAWEI_SECURE_C}
    PUBLIC ${GLIB_LIBRARIES}
    PUBLIC ${CONAN_LIBS_LIBMC4LUA}
    PUBLIC logging
    PUBLIC frudata
)
set_target_properties(${FRUDATA_LIB} PROPERTIES PREFIX "")
install(TARGETS ${FRUDATA_LIB} DESTINATION ${LUACLIB_INSTALL_DIR})
